package com.oracle.application.config;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author 张家城
 * @Date 2021-07-01 下午 3:01
 * @Version 1.0
 */
@Configuration
public class RandomLoadBanlance {

    //spring-xml 配置文件 <bean id class="goodsservice" class="GoodService">
    @Bean("/randomRule")
    public IRule randomLoadBanlance(){
        return new RandomRule();
    }
}
